ab39369cbe8d931fdfbe142837274ba2c18fd668,java/src/main/java/com/rapplogic/aru/uploader/xbee/XBeeSketchUploader.java,XBeeSketchUploader,waitForAck,#number#number#,75

Before Change


			long timeoutMillis = timeout * 1000;
			
			while (timeoutMillis > 0) {
				if (rxPacketCondition.await(timeoutMillis, TimeUnit.MILLISECONDS)) {
					int[] reply = null;
					
					reply = replies.poll();

After Change


	public final int XBEE_PAGE_SIZE = 64;
	
	final ReentrantLock lock = new ReentrantLock();
	final Condition rxPacketCondition = lock.newCondition();
	
	public XBeeSketchUploader() {
		super();
	}
	
	private XBee xbee = new XBee();
	
	public void process(String file, String device, int speed, String xbeeAddress, final boolean verbose, int ackTimeout, int arduinoTimeout, int retriesPerPacket) throws IOException {
		Map<String,Object> context = Maps.newHashMap();
		context.put("device", device);
		context.put("speed", speed);
		XBeeAddress64 xBeeAddress64 = new XBeeAddress64(xbeeAddress);
		context.put("xbeeAddress", xBeeAddress64);
		
		super.process(file, XBEE_PAGE_SIZE, ackTimeout, arduinoTimeout, retriesPerPacket, verbose, context);